﻿<UserControl x:Class="Workbench.Presentation.ExercisesView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:uc="clr-namespace:Workbench.Presentation.UserContols" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="500" d:DesignWidth="700">
    <DockPanel Margin="5">
        <Grid DockPanel.Dock="Left" Margin="5">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"></ColumnDefinition>
                <ColumnDefinition Width="50"></ColumnDefinition>
                <ColumnDefinition Width="2*"></ColumnDefinition>
                <ColumnDefinition Width="20"></ColumnDefinition>
                <ColumnDefinition Width="50"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <DockPanel Grid.Column="0" Grid.Row="0" Margin="5">
                <StackPanel Margin="0 5" DockPanel.Dock="Bottom" Orientation="Horizontal" HorizontalAlignment="Right">
                    <Button Width="60" Margin="0 0 5 0" Command="{Binding AddSuite}">Add</Button>
                    <Button Width="60" Command="{Binding RemoveSuite}">Remove</Button>
                </StackPanel>
                <ListBox DockPanel.Dock="Top" ItemsSource="{Binding ExerciseSuites}">
                    <ListBox.ItemContainerStyle>
                        <Style TargetType="{x:Type ListBoxItem}">
                            <Setter Property="IsSelected" Value="{Binding IsSelected}"/>
                        </Style>
                    </ListBox.ItemContainerStyle>
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <TextBlock Text="{Binding Name}"></TextBlock>
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>
            </DockPanel>
            <DockPanel Grid.Row="0" Grid.Column="2" Margin="5">
                <StackPanel Margin="0 5" DockPanel.Dock="Bottom" Orientation="Horizontal" HorizontalAlignment="Right">
                    <Button Width="180" Margin="0 0 5 0" Command="{Binding AddConcordancerExercise}">Add Concordancer Exercise</Button>
                    <Button Width="60" Command="{Binding RemoveExercise}">Remove</Button>
                </StackPanel>
                <ListBox DockPanel.Dock="Bottom" ItemsSource="{Binding Exercises}">
                    <ListBox.ItemContainerStyle>
                        <Style TargetType="{x:Type ListBoxItem}">
                            <Setter Property="IsSelected" Value="{Binding IsSelected}"/>
                        </Style>
                    </ListBox.ItemContainerStyle>
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <StackPanel>
                                <TextBlock Text="{Binding SentencesPlain}" ></TextBlock>
                            </StackPanel>
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>
            </DockPanel>
        </Grid>
    </DockPanel>
</UserControl>
